package com.mlink.ai.chat.utils

import android.content.Context
import android.os.Bundle
import com.eventloggercollectutils.EventLoggerUtils
import com.facebook.appevents.AppEventsLogger
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.ktx.Firebase

fun String.logEvent(params: Bundle? = null) {
    Firebase.analytics.logEvent(this, params)
    EventLoggerUtils.upEventLoggerData(this)
}

fun String.logFacebookEvent(context: Context, params: Bundle? = null) {
    val logger = AppEventsLogger.newLogger(context)
    logger.logEvent(this, params)
}